#include "SystemMessage.h"

//SystemMessage::SystemMessage(int source, int target, int dest, string msg, int steps) :
//	Message(source, target), destination(dest), content(msg), steps(steps)
//{
//}

SystemMessage::SystemMessage(SystemMessage* s, int nextHop) :
	Message(s->target, nextHop), origin(s->origin), destination(s->destination), content(s->content), steps(s->steps+1)
{
}

SystemMessage::SystemMessage(int source, int target, string msg) :
	Message(0, source), origin(source), destination(target), content(msg), steps(1)
{
}

SystemMessage::~SystemMessage()
{
}

MessageType SystemMessage::msgType() {
	return SYSTEM_MSG;
}

ostream& operator<< ( std::ostream& output, const SystemMessage& t) {
	return output << *((Message*)&t) << " - SystemMessage " << t.content;
}
